package com.hsd.znsh.repository;

import com.hsd.znsh.entity.Host;
import com.hsd.znsh.entity.HostManager;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/*
 * @auther: wangjiacai
 *
 * @create: 2018-04-23 11:54:50
 */
public interface HostManagerRepository extends JpaRepository<HostManager,Integer> {

    @Query("select hostId from HostManager where secondManagerId = ?1")
    List<Integer> findBySecondManagerId(Integer userId);

    void deleteBySecondManagerId(Integer managerId);
}
